package observer_pattern.v1;

/**
 * 股票观察者类
 * @author ricejson
 */
public class StockObserver {
    private String name;
    private Secretary secretary;

    public StockObserver(String name, Secretary secretary) {
        this.name = name;
        this.secretary = secretary;
    }

    public void update() {
        System.out.println(secretary.getAction() + "," + this.name + "关闭股票行情，继续工作！");
    }
}
